package Application;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

import XmlLoader.Constant;

public class ReadFileGenerateor {

	public ReadFileGenerateor() {}
	
	public void ACT001_genFile(String filePath, int start, int genNum) {
		int index = 0;
		File file = new File(filePath);
		try {
			BufferedWriter bufWriter = new BufferedWriter(
					new OutputStreamWriter(new FileOutputStream(file,false),"utf8"));
			index = start;
			while(index < start + genNum) {
				bufWriter.write(index + " ");
				index = index + 1;
			}
			bufWriter.flush();
			bufWriter.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	public static void main(String[] args) {
		new ReadFileGenerateor().ACT001_genFile("123.txt", 0, 4118);
	}
}
